"use client";
import { useRouter } from 'next/navigation';
import { startTransition } from 'react';

export default function BlogDetailsError({ error, reset }) {
  const router = useRouter()
  const reload = () => {
    startTransition(() => {
      router.refresh()
      reset()
    })
  }
  return <>
    <h1 style={{ color: "red" }}>{error.message}</h1>
    <button onClick={reload}>重试</button>
  </>
}
